package com.techsoul.module.order.pojo.vo;

import com.techsoul.common.core.annotation.ExcelField;
import com.techsoul.module.order.mapper.SalesOrderItemMapper;
import com.techsoul.module.order.service.IPurchaseOrderService;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.beans.factory.annotation.Autowired;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 销售订单明细 Vo
 * 
 * @author liuen
 * @date 2020-12-07
 */
@Data
@Accessors(chain = true)
public class SalesOrderItemVo implements Serializable {

    private static final long serialVersionUID = 1L;
//    @Autowired
//    private SalesOrderItemMapper salesOrderItemMapper;
    @ApiModelProperty("商品ID")
    private String goodsId;

    @ApiModelProperty("ID（系统自动产生）")
    private String id;

    @ApiModelProperty("销售订单ID")
    private String salesOrderId;

    @ApiModelProperty("当前库存")
    private BigDecimal itemStockQty;
//    public BigDecimal getItemStockQty(){
//        BigDecimal qty = this.salesOrderItemMapper.findItemStockQty(this.skuId,this.site);
//        return qty;
//    }
    @ApiModelProperty("销售订单号")
    private String salesOrderNo;

    @ApiModelProperty("合同号")
    private String contractNo;
    @ApiModelProperty("销售订单明细")
    private String salesOrderItemNo;

    @ApiModelProperty("分类ID")
    private String categoryId;

    @ApiModelProperty("分类名称")
    private String categoryName;

    @ApiModelProperty("SPU_ID")
    private String spuId;

    @ApiModelProperty("SKU_ID")
    private String skuId;

    @ApiModelProperty("SPU_NAME") //有
    private String spuName;


    @ApiModelProperty("客户子订单号")
    @ExcelField(title = "子订单编号", sort = 10)
    private String custSalesOrderItemNo;

    @ApiModelProperty("SKU名称") //有
    @ExcelField(title = "商品名称", sort = 20)
    private String skuName;

    @ApiModelProperty("店铺来源")//有
    @ExcelField(title = "店铺来源", sort = 25)
    private String storeSource;

    @ApiModelProperty("店铺名称")//有
    private String storeName;

    @ApiModelProperty("供应商名称")//有
    private String supplierName;

    @ApiModelProperty("店铺编码")
    @ExcelField(title = "店铺编码", sort = 30)
    private String storeId;

    @ApiModelProperty("客户商品编号")
    @ExcelField(title = "商品编号", sort = 40)
    private String custSpuId;

    @ApiModelProperty("客户SKU编号")
    @ExcelField(title = "sku编号", sort = 45)
    private String custSkuId;

    @ApiModelProperty("单价(现金)")
    @ExcelField(title = "单价(现金)", sort = 50)
    private String custSaleUnitPrice;

    @ApiModelProperty("单价(里程)")
    @ExcelField(title = "单价(里程)", sort = 55)
    private String custSaleUnitMile;

    @ApiModelProperty("销售价格单价")
    private Double unitPricePoint;

    @ApiModelProperty("销售价格(积分)")
    private Double salePricePoint;

    @ApiModelProperty("数量") //有
    @ExcelField(title = "数量", sort = 60)
    private Long qty;

    @ApiModelProperty("订单支付金额（现金）")
    @ExcelField(title = "订单支付金额（现金）", sort = 65)
    private String custCashPaymentAmt;

    @ApiModelProperty("订单支付金额（里程）")
    @ExcelField(title = "订单支付金额（里程）", sort = 70)
    private String custMilePaymentAmt;

    @ApiModelProperty("与营销委结算价")
    @ExcelField(title = "与营销委结算价", sort = 71)
    private String custRelSalesPrice;

    @ApiModelProperty("订单状态")
    @ExcelField(title = "订单状态", sort = 75)
    private String custOrderStatus;

    @ApiModelProperty("下单时间")
    @ExcelField(title = "下单时间", sort = 80)
    private String orderTime;

    @ApiModelProperty("物流添加时间")
    @ExcelField(title = "物流添加时间", sort = 90)
    private String deliveryAddTime;

    @ApiModelProperty("收货人")
    @ExcelField(title = "收货人", sort = 95)
    private String consigneeName;

    @ApiModelProperty("收货人电话")
    @ExcelField(title = "收货人电话", sort = 100)
    private String consigneePhone;

    @ApiModelProperty("收货人地址")
    @ExcelField(title = "收货人地址", sort = 105)
    private String consigneeAddress;

    @ApiModelProperty("是否有售后")//
    @ExcelField(title = "售后服务", sort = 110)
    private String afterSaleService;

    // 付款形式 (0:支付宝,1:易宝银联在线,2:中信,3:线下支付(货到付款),4支付宝其他银行,5里程支付(南航UPP),6微信支付,7支付宝+里程支付(南航UPP),8微信端微信支付+里程支付(南航UPP)),9浏览器微信支付+里程支付(南航UPP)"
    @ApiModelProperty("支付类型") // 积分 现金 礼品 混合 有
    @ExcelField(title = "支付类型", sort = 110)
    private String paymentType;

   // 结算状态  买家编号
         //   审核状态
    @ApiModelProperty("客户主订单号")
    @ExcelField(title = "主订单编号", sort = 115)
    private String custSalesOrderNo;

    @ApiModelProperty("商品属性")
    @ExcelField(title = "商品属性", sort = 120)
    private String productAttribution; //有
    @ApiModelProperty("单位")
    private String unit;

    @ApiModelProperty("折扣活动名称")
    @ExcelField(title = "优惠活动名称", sort = 125)
    private String discountActivityName;//有

    @ApiModelProperty("折扣活动码")
    @ExcelField(title = "折扣活动编号", sort = 130)
    private String discountActivityCode;


    @ApiModelProperty("店铺折扣金额")
    @ExcelField(title = "商家优惠券金额(现金)", sort = 135)
    private Double storeDiscountAmt;

    @ApiModelProperty("店铺折扣金额(积分)")
    @ExcelField(title = "商家优惠券金额(里程)", sort = 140)
    private Double storeDiscountAmtPoint;

    @ApiModelProperty("店铺折扣活动编码")
    @ExcelField(title = "商家优惠券活动编号", sort = 141)
    private String storeDiscountActId;

    @ApiModelProperty("店铺折扣码")
    @ExcelField(title = "商家优惠券券码", sort = 145)
    private String storeDiscountCode;



    @ApiModelProperty("商城折扣活动折扣(里程)")
    @ExcelField(title = "商城优惠券金额(里程)", sort = 150)
    private Double mallDiscountMilePoints;

    @ApiModelProperty("商城折扣活动编号")
    @ExcelField(title = "商城优惠券活动编号", sort = 155)
    private String mallDiscountActId;

    @ApiModelProperty("商城折扣活动折扣")
    private Double mallDiscountAmt;

    @ApiModelProperty("商城折扣活动码")
    @ExcelField(title = "商城优惠券券码", sort = 165)
    private String mallDiscountCode;

    @ApiModelProperty("运费")
    @ExcelField(title = "运费(现金)", sort = 200)
    private Double freightFee;

    @ApiModelProperty("运费-里程") //有
    @ExcelField(title = "运费(里程)", sort = 210)
    private String freightFeePoint;

    @ApiModelProperty("商城买家编号")
    @ExcelField(title = "商城买家编号", sort = 220)
    private String mallBuyerNo;

    @ApiModelProperty("付款状态")
    @ExcelField(title = "支付状态", sort = 230)
    private String paymentStatus;

    @ApiModelProperty("发货状态")
    @ExcelField(title = "配送状态", sort = 255)
    private String deliveryStatus;

    @ApiModelProperty("支付渠道")
    @ExcelField(title = "支付渠道", sort = 260)
    private String paymentChannal;

    @ApiModelProperty("UPP支付流水号")
    @ExcelField(title = "UPP支付流水号", sort = 265)
    private String uppPaymentSeqNo;

    @ApiModelProperty("支付商")
    @ExcelField(title = "支付商", sort = 270)
    private String paymentHandleCompany;

    @ApiModelProperty("支付商流水号")
    @ExcelField(title = "支付商流水号", sort = 275)
    private String paymentHandleCompanySeqNo;

    @ApiModelProperty("支付渠道(里程)") //有
    @ExcelField(title = "支付渠道(里程)", sort = 280)
    private String paymentChannalPoint;


    @ApiModelProperty("UPP支付流水号(里程)") //有
    @ExcelField(title = "UPP支付流水号(里程)", sort = 285)
    private String uppPaymentSeqNoPoint;

    @ApiModelProperty("支付商(里程)") //有
    @ExcelField(title = "支付商(里程)", sort = 290)
    private String paymentHandleCompanyPoint;

    @ApiModelProperty("支付商(里程)流水号")//有
    @ExcelField(title = "支付商(里程)", sort = 295)
    private String paymentHandleCompanyPonitSeqNo;

    @ApiModelProperty("订单来源")//有
    @ExcelField(title = "订单来源", sort = 300)
    private String  orderSource;

    @ApiModelProperty("客户留言") //有
    @ExcelField(title = "客户留言", sort = 300)
    private String  custNote;


    @ApiModelProperty("明珠卡号")
   // @ExcelField(title = "明珠卡号", sort = 60)
    private String pMemberShipCardNo;

    @ApiModelProperty("收货人ID")
    private String consigneeId;


    @ApiModelProperty("单品还是组合")
  //  @ExcelField(title = "单品还是组合", sort = 310)
    private String groupOrSpu;

    @ApiModelProperty("重量")
    private Long weight;

    @ApiModelProperty("单价")
    private Double price;

    @ApiModelProperty("总金额")
    private Double money;

    @ApiModelProperty("实付金额")
    private Double payMoney;

    @ApiModelProperty("图片地址")
    private String image;

    @ApiModelProperty("是否退货")
    private String isReturn;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("是否有效（数据字典sys_yn_type，默认1-是）")
    private String isValid;

    @ApiModelProperty("创建人")
    private String createBy;

    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("更新人")
    private String updateBy;

    @ApiModelProperty("更新时间")
    private Date updateTime;

    @ApiModelProperty("创建人名称")
    private String createByName;

    @ApiModelProperty("更新人名称")
    private String updateByName;

    @ApiModelProperty("品牌名")
    private String  brandName;

    @ApiModelProperty("供应商编码")
    private String supplierNo;

    @ApiModelProperty("采购价格")
    private Double  buyPrice;

    @ApiModelProperty("推荐码")
    private String referenceCode;

    @ApiModelProperty("E会员卡号码")
    private String eMemberShipCardNo;

    @ApiModelProperty("会员卡等级")
    private String memberShipcardDegree;

    @ApiModelProperty("可疑指数")
    private String suspiciousIndex;

    @ApiModelProperty("是否开票")
    private String invoiceYn;

    @ApiModelProperty("发票类型")
    private String invoiceType;

    @ApiModelProperty("发票抬头")
    private String invoiceName;

    @ApiModelProperty("纳税人识别号")
    private String  invoiceBusinessId;

    @ApiModelProperty("买家注册地址")
    private String buyerRegAddress;

    @ApiModelProperty("买家电话")
    private String buyerRegPhone;

    @ApiModelProperty("银行名称")
    private String bankName;

    @ApiModelProperty("银行账户")
    private String bankAccount;

    @ApiModelProperty("收票内容")
    private String invoiceContent;

    @ApiModelProperty("收票人电话")
    private String invoiceReceiverPhone;

    @ApiModelProperty("收票人邮件")
    private String invoiceReceiverEmail;

    @ApiModelProperty("批号")
    private String batchNo;

    @ApiModelProperty("活动号")
    private String actId;

    // 订单类型:  1:普通订单 2:自提订单 3:跨境购订单 4:免税订单 5:公里订单 6:虚拟订单
    @ApiModelProperty("订单类型") // normal普通订单    actcoupon活动奖品订单
    private String orderType;

    @ApiModelProperty("提货地址编码")
    private String pickUpAddressId;

    @ApiModelProperty("提货地址")
    private String pickUpAddress;

    @ApiModelProperty("提货码")
    private String pickUpCode;

    @ApiModelProperty("提货码状态")
    private String pickUpCodeStatus;

    @ApiModelProperty("组合货号编码")
    private String goodGroupId;

    @ApiModelProperty("结算生成失败原因")
    private String genAccFailedReason;
    @ApiModelProperty("生成结算状态")
    private String status;

    @ApiModelProperty("客户名称") //有
    private String  customerName;

    @ApiModelProperty("客户编码") //有
    private String customerNo;

    @ApiModelProperty("商品映射编码") //有
    private String materialMapId;

    @ApiModelProperty("域")
    private String site;
    @ApiModelProperty("原始订单数量")
    private Long originalQty;

    // 南航新增字段--开始
    @ApiModelProperty("订单类型名称")
    private String orderTypeName;

    @ApiModelProperty("序号")
    private Integer seq;

    @ApiModelProperty("商城买家编号")
    private String buyerId;

    @ApiModelProperty("退款类型 1 ： 普通退款 2：里程退款")
    private String returnType;

    @ApiModelProperty("支付渠道（里程）: 默认是：“南航UPP”")
    private String mileagePaymentChannel;

    @ApiModelProperty("支付类型: 1现金支付  10里程支付  11混合支付")
    private String shipmentType;

    @ApiModelProperty("运费（里程）")
    private String mileageFreight;

    @ApiModelProperty("订单状态名称")
    private String custOrderStatusName;

    @ApiModelProperty("单价(现金)")
    private Double payPrice;

    @ApiModelProperty("单价(里程)")
    private Double mileagePayPrice;

    @ApiModelProperty("售后服务: 进行中  退款关闭  退款成功")
    private String afterServiceName;

    @ApiModelProperty("订单配送方式: 1.快递发货、2.上门自提")
    private String orderDistributionWay;

    @ApiModelProperty("渠道终端名称")
    private String orderSourceName;

    @ApiModelProperty("折扣活动编号")
    private String activityId;

    @ApiModelProperty("折扣活动名称")
    private String activityName;

    @ApiModelProperty("支付渠道（现金）: 默认是：“南航UPP”")
    private String paymentChannel;

    @ApiModelProperty("商家优惠券金额（现金）")
    private Double couponDiscount;

    @ApiModelProperty("商家优惠券金额（里程）")
    private Double mileageCouponDiscount;

    @ApiModelProperty("南航-订单来源")
    private String canalName;

    @ApiModelProperty("支付商（里程）")
    private String mileagePaymentTypeName;

    @ApiModelProperty("商品属性")
    private String attributes;

    // 南航新增字段--结束

    @ApiModelProperty("导入错误代码")
    private String errorCode;

    @ApiModelProperty("销售价格-自生成")
    private Double amtGenAr;
    @ApiModelProperty("报错信息")
    private String importErrorMesg;

    @ApiModelProperty("报错信息标识")
    private String errorFlag;
    @ApiModelProperty("退单号")
    private String returnOrderItemNo;
    @ApiModelProperty("退单金额")
    private Double returnAmt;
    @ApiModelProperty("退单数量")
    private Integer returnQty;


    @ApiModelProperty("单品合计")
    private Double sumQty;


    @ApiModelProperty("活动类型")
    private String actType;
    @ApiModelProperty("营销委结算单价")
    private Double custRelSalesUnitPrice;
    @ApiModelProperty("供应商处理状态")
    private String supplierStatus;
    @ApiModelProperty("采购状态")
    private String purchaseStatus;
}
